<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>按需递增输出星号</title>
</head>
<body>
	<script>
		//start 开始的个数
		//lines 总行数
		function star(start,lines){
			for (var i = start; i <=start+lines; i++) {
				for (var n = 0; n < i; n++) {
					document.write("*");
				}
				document.write("<br/>");
			}
		}
		star(5,10)
		
	</script>
</body>
</html>